package com.apexsoft.front.common.db.mysql;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;


public class ReflectObject implements Serializable{
	
	private static final long serialVersionUID = 1L;

	protected transient String tableName = null;

	protected transient String[] primaryKeyNames = new String[1];
	
	private transient Map<String, Object> propertyMap = new HashMap<String, Object>();

	public ReflectObject() {

	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	/*public Map<String, Object> getPropertyMap() {
		return propertyMap;
	}

	public void setPropertyMap(Map<String, Object> propertyMap) {
		this.propertyMap = propertyMap;
	}*/

	public void setProperty(String key, Object value) {
		propertyMap.put(key, value);
	}

	public Object getProperty(String key) {
		return propertyMap.get(key);
	}

	public String[] getPrimaryKeyNames() {
		return primaryKeyNames;
	}

	public void setPrimaryKeyNames(String[] primaryKeyNames) {
		this.primaryKeyNames = primaryKeyNames;
	}
	
	public String toStringWithoutId() {
		return "ReflectObject [tableName=" + tableName + 
				", primaryKeyNames=" + primaryKeyNames + "]";
	}
	
}